" 显示行号
set nu
" 设置相对行号
set relativenumber
" 忽略大小写
set ignorecase
" 设置光标所在行
set cursorline
" 设置光标所在列
set cursorcolumn
" 语法高亮
syntax on
" 设置滚动
set scrolloff=10

" 设置自动换行
set autoindent 
set smartindent

"color molokai

colorscheme onedark


call plug#begin('~/.config/nvim/plugged')


"Plug 'neovim/nvim-lspconfig'
"Plug 'glepnir/lspsaga.nvim'

Plug 'luochen1990/rainbow'


Plug 'liuchengxu/vista.vim'

" LeaderF
"Plug 'Yggdroot/LeaderF'
"右侧迷你地图
"Plug 'severin-lemaignan/vim-minimap'
" 搜索插件
Plug 'rking/ag.vim'
" html插件
Plug 'mattn/emmet-vim'

" 文件搜索插件
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'


" coc插件管理平台
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}

" 界面插件
Plug 'mhinz/vim-startify'
"tab补全插件
Plug 'ervandew/supertab'

" 状态栏
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

"语法高亮插件
Plug 'sheerun/vim-polyglot'

" 缩进插件
Plug 'Yggdroot/indentLine'

"树形目录插件
Plug 'preservim/nerdtree'


"括号补全
Plug  'jiangmiao/auto-pairs'

" 弹窗插件
Plug 'voldikss/vim-floaterm' 
"注释插件
Plug 'preservim/nerdcommenter'

Plug 'pechorin/any-jump.vim'

"ranger插件
Plug 'francoiscabrol/ranger.vim'
Plug 'rbgrouleff/bclose.vim'

call plug#end()

"let g:airline_theme = "bubblegum"

nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)



" 按回车自动补全并引入包
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" 按住光标时，突出显示符号及其引用。
"autocmd CursorHold * silent call CocActionAsync('highlight')

"colors ron

"colors onedark
hi PmenuSel ctermfg=none ctermbg=white
hi CocFloating ctermfg=white ctermbg=black
" float弹窗配置
map <F3> :FloatermNew<CR>
let g:floaterm_winblend = 0
let g:floaterm_height = 0.9
let g:floaterm_width = 0.9
let g:floaterm_autoclose = 1

" 设置NERDTree切换快捷键
map <F2> :NERDTreeToggle<CR>
"autocmd VimEnter * NERDTree

let g:rainbow_active = 1


"let mapleader = " "
"映射空格加w 为保存 
nnoremap <space>w :w<CR>
"let g:coc_disable_startup_warning = 1
nnoremap <space>e :CocCommand explorer<CR>

let g:vista_icon_indent = ["╰─▸ ", "├─▸ "]

let g:vista_default_executive = 'nvim_lsp'


map <C-r> :Vista coc<CR>

"set foldmethod=manual
"set fdm=indent


let g:user_emmet_expandabbr_key = '<C-e>'

map <C-a> ggVGY

let mapleader = ","




